package com.supermap.disaster.service;

import com.supermap.common.JSONUtil;
import com.supermap.disaster.entity.DisasterComment;
import com.supermap.disaster.entity.Disasterpraise;


/**
 * @author lxs
 * @Title:灾害业务层
 * @Description:
 * @date 2018/3/1  15:19
 */
public interface DisasterTypeService {
    /**
     * 查询全部灾害
     * @return
     */
    JSONUtil getAllDisasterType();

    /**
     * 根据灾情ID得到所有的点赞数
     * @param disasterId
     * @return
     */
    int getDisasterPraiseCount(int disasterId);

    /**
     * 判断该用户是否对该灾情点过赞
     * @param userId
     * @param disasterId
     * @return
     */
    boolean getDisasterPraise(int userId,int disasterId);

    /**
     * 添加点赞
     * @param disasterpraise
     * @return
     */
    boolean addDisasterPraise(Disasterpraise disasterpraise);

    /**
     * 添加评论
     * @param disasterComment
     * @return
     */
    boolean addDisasterComment(DisasterComment disasterComment,String uid);

    /**
     * 根据灾害ID得到对应所有的评论（树形结构）
     * @param disasterId
     * @return
     */
    JSONUtil getAllDisasterCommentByagrInfoId(int disasterId);
}
